export interface ISelectOptionDto {
  label:string;
  value:string;
}

export class SelectOptionDto implements ISelectOptionDto {
  label: string;
  value: string;

  constructor(data?: ISelectOptionDto) {
    if (data) {
      for (var property in data) {
        if (data.hasOwnProperty(property))
          (<any>this)[property] = (<any>data)[property];
      }
    }
  }

  init(data?: any) {
    if (data) {
      this.label = data["label"];
      this.value = data["value"];
      
    }
  }

  static fromJS(data: any): SelectOptionDto {
    data = typeof data === 'object' ? data : {};
    let result = new SelectOptionDto();
    result.init(data);
    return result;
  }

  toJSON(data?: any) {
    data = typeof data === 'object' ? data : {};
    data["label"] = this.label;
    data["value"] = this.value;

    return data;
  }

  clone() {
    const json = this.toJSON();
    let result = new SelectOptionDto();
    result.init(json);
    return result;
  }
}




